package com.kira.scaffoldmvc.Mapper.ds2;

import com.kira.scaffoldmvc.DataSource.DsTest;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DsTestMapper {

    @Select("select * from dstest")
    List<DsTest> selectAll();

    @Insert("<script>" +
            "INSERT INTO dstest (test) VALUES " +
            "<foreach collection=\"list\" item=\"item\" separator=\",\">" +
            "(#{item.test})" +
            "</foreach>" +
            "</script>")
    int batchInsert(List<DsTest> list);

}
